$package('jeecg.p2pTdVersionManager');
jeecg.p2pTdVersionManager = function(){
	var _box = null;
	var _this = {
		config:{
			event:{
				add:function(){
					$('#typeIds_combobox').combobox('reload');
					_box.handler.add();
				},
				edit:function(){
					$('#typeIds_combobox').combobox('reload');
					_box.handler.edit();
				}
			},
  			dataGrid:{
  				title:'版本管理',
	   			url:'dataList.do',
	   			columns:[[
					{field:'id',checkbox:true},
					{field:'system',title:'系统',align:'center',sortable:true,
							formatter:function(value,row,index){
								return row.system;
							}
						},
					{field:'version',title:'版本',align:'center',sortable:true,
							formatter:function(value,row,index){
								return row.version;
							}
						},
					{field:'force_update',title:'强制更新',align:'center',sortable:true,
							formatter:function(value,row,index){
								return row.force_update;
							}
						},
					{field:'prompt_update',title:'提示更新',align:'center',sortable:true,
							formatter:function(value,row,index){
								return row.prompt_update;
							}
						},
					{field:'no_prompt_update',title:'无提示更新',align:'center',sortable:true,
							formatter:function(value,row,index){
								return row.no_prompt_update;
							}
						},
					{field:'create_date',title:'创建时间',align:'center',sortable:true,
							formatter:function(value,row,index){
								return row.create_date;
							}
						},
					{field:'data_status',title:'状态',align:'center',sortable:true,
							formatter:function(value,row,index){
								return row.data_status;
							}
						},
					{field:'force_update_text',title:'强制更新提示语',align:'center',sortable:true,
							formatter:function(value,row,index){
								return row.force_update_text;
							}
						},
					{field:'prompt_update_text',title:'提示信息提示语',align:'center',sortable:true,
							formatter:function(value,row,index){
								return row.prompt_update_text;
							}
						},
					{field:'bak1',title:'备用字段1',align:'center',sortable:true,
							formatter:function(value,row,index){
								return row.bak1;
							}
						},
					{field:'bak2',title:'备用字段2',align:'center',sortable:true,
							formatter:function(value,row,index){
								return row.bak2;
							}
						},
					{field:'bak3',title:'备用字段3',align:'center',sortable:true,
							formatter:function(value,row,index){
								return row.bak3;
							}
						},
					]]
			}
		},
		init:function(){
			_box = new YDataGrid(_this.config); 
			_box.init();
		}
	}
	return _this;
}();

$(function(){
	jeecg.p2pTdVersionManager.init();
});